package io.lkt.modules.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.lkt.common.utils.PageUtils;
import io.lkt.common.utils.Query;

import io.lkt.modules.sys.dao.BUserShieldDao;
import io.lkt.modules.sys.entity.BUserShieldEntity;
import io.lkt.modules.sys.service.BUserShieldService;


@Service("bUserShieldService")
public class BUserShieldServiceImpl extends ServiceImpl<BUserShieldDao, BUserShieldEntity> implements BUserShieldService {
    @Autowired
    private BUserShieldDao bUserShieldDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BUserShieldEntity> page = this.page(
                new Query<BUserShieldEntity>().getPage(params),
                new QueryWrapper<BUserShieldEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public BUserShieldEntity getByUserId(Integer userId) {
        return bUserShieldDao.getByUserId(userId);
    }

    @Override
    public int deleteByUserId(Integer userId) {
        return bUserShieldDao.deleteByUserId(userId);
    }

    @Override
    public List<BUserShieldEntity> getList(Map<String, Object> params) {
        return bUserShieldDao.getList(params);
    }

    @Override
    public Integer getListTotal(Map<String, Object> params) {
        return bUserShieldDao.getListTotal(params);
    }

}
